STEP 17: If the bricks list is empty, the user has won! Let's add that condition to our interval event.

  • In LOGIC from add Get Length of List indented ONCE inside the interval event.
  • Change my_var to bricks_left and my_list to bricks.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)